From: Keir Fraser Date: Sat, 24 Nov 2007 13:37:26 +0000 (+0000) Subject: Fix non-optimized compilation of Xen's memcmp X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14712 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=4224d675249d81ae901be9a8bcd2b140eb884952;p=xen.git Fix non-optimized compilation of Xen's memcmp Even when using __builtin_memcmp, gcc may emit external references to memcmp (when not optimizing for instance), so this #define does not always provide a completely suitable memcmp(). Signed-off-by: Samuel Thibault Signed-off-by: Keir Fraser --- diff --git a/xen/common/string.c b/xen/common/string.c index 562f6cb585..5a357430f1 100644 --- a/xen/common/string.c +++ b/xen/common/string.c @@ -370,6 +370,7 @@ void * memmove(void * dest,const void *src,size_t count) #endif #ifndef __HAVE_ARCH_MEMCMP +#undef memcmp /** * memcmp - Compare two areas of memory * @cs: One area of memory diff --git a/xen/include/asm-x86/string.h b/xen/include/asm-x86/string.h index 2bbdf0ce42..5921d22c85 100644 --- a/xen/include/asm-x86/string.h +++ b/xen/include/asm-x86/string.h @@ -109,7 +109,8 @@ void *__memcpy(void *t, const void *f, size_t n) #define __HAVE_ARCH_MEMMOVE extern void *memmove(void *dest, const void *src, size_t n); -#define __HAVE_ARCH_MEMCMP +/* Some versions of gcc emit references to memcmp despite this macro defn. */ +/*#define __HAVE_ARCH_MEMCMP*/ #define memcmp __builtin_memcmp static inline void *__memset_generic(void *s, char c, size_t count)